package Core;

import Controls.Button;
import Core.ControlImage;
import javax.microedition.lcdui.Font;

public class ContextAction
{
	public int ID = 0;
	public ContextMenu menu;
	public Button button;
	private static ControlImage arr = new ControlImage("/contextArrow.png", ALIGN.RIGHT);

	public ContextAction()
	{}

	public ContextAction(ContextMenu menu, Button button, int ID)
	{
		this.menu = menu;
		this.button = button;
		if(menu != null && button != null) button.addImage(arr);
		this.ID = ID;
	}

	public ContextAction(String name, int ID, ContextMenu m)
	{
		button = new Button(name, GUICanvas.manager.getW()/3*2, Font.getDefaultFont().getHeight()+1, "/strong-light.cfg", "/strong-dark.cfg", "/strong-light.cfg");
		menu = m;
		if(menu != null && button != null) button.addImage(arr);
		this.ID = ID;
	}

	public ContextAction(String name, ContextMenu m)
	{
		button = new Button(name, GUICanvas.manager.getW()/3*2, Font.getDefaultFont().getHeight()+1, "/strong-light.cfg", "/strong-dark.cfg", "/strong-light.cfg");
		menu = m;
		if(menu != null && button != null) button.addImage(arr);
	}

	public ContextAction(String name)
	{
		button = new Button(name, GUICanvas.manager.getW()/3*2, Font.getDefaultFont().getHeight()+1, "/strong-light.cfg", "/strong-dark.cfg", "/strong-light.cfg");
		menu = null;
	}
}
